﻿using Inovout.Gis.Geometry;
using Inovout.Gis.Element;
using Inovout.Gis.Attribute;

namespace Inovout.Gis.Land.DiLei
{
    public class DiLeiLine : LineElement
    {
        public DiLeiLine(ILineInfo lineInfo)
            : base(lineInfo, lineInfo as IAttribute)
        {
        }
        private DiLeiLine(ILineInfo lineInfo,IAttribute attribute)
           :base(lineInfo,attribute)
        {
        }

        public string DLCode
        {
            get
            {
                return base.GetPropertyValue<string>(DLCodeProperyName);
            }
        }

        private readonly string DLCodeProperyName = "DL";


        internal void Intersect(IGeometryInfo geometry, out double mj)
        {
            mj = 0;
            IPointInfo pointInfo = base.GetIntersectGeometry(geometry) as IPointInfo;
            if (pointInfo != null)
            {
                mj = geometry.Area;
            }
        }
    }
}
